Telegram Group & Telegram Channel
This media is not supported in your browser
VIEW IN TELEGRAM
๐Š-๐Œ๐ž๐š๐ง๐ฌ ๐‚๐ฅ๐ฎ๐ฌ๐ญ๐ž๐ซ๐ข๐ง๐  ๐„๐ฑ๐ฉ๐ฅ๐š๐ข๐ง๐ž๐ - ๐Ÿ๐จ๐ซ ๐›๐ž๐ ๐ข๐ง๐ง๐ž๐ซ๐ฌ

๐–๐ก๐š๐ญ ๐ข๐ฌ ๐Š-๐Œ๐ž๐š๐ง๐ฌ?
Itโ€™s an unsupervised machine learning algorithm that automatically groups your data into K similar clusters without labels. It finds hidden patterns using distance-based similarity.

๐ˆ๐ง๐ญ๐ฎ๐ข๐ญ๐ข๐ฏ๐ž ๐ž๐ฑ๐š๐ฆ๐ฉ๐ฅ๐ž:
You run a mall. Your data has:
โ€บ Age
โ€บ Annual Income
โ€บ Spending Score

K-Means can divide customers into:
โคท Budget Shoppers
โคท Mid-Range Customers
โคท High-End Spenders

๐‡๐จ๐ฐ ๐ข๐ญ ๐ฐ๐จ๐ซ๐ค๐ฌ:
โ‘  Choose the number of clusters K
โ‘ก Randomly initialize K centroids
โ‘ข Assign each point to its nearest centroid
โ‘ฃ Move centroids to the mean of their assigned points
โ‘ค Repeat until centroids donโ€™t move (convergence)

๐Ž๐›๐ฃ๐ž๐œ๐ญ๐ข๐ฏ๐ž:
Minimize the total squared distance between data points and their cluster centroids
๐‰ = ฮฃโ€–๐ฑแตข - ฮผโฑผโ€–ยฒ
Where ๐ฑแตข = data point, ฮผโฑผ = cluster center

๐‡๐จ๐ฐ ๐ญ๐จ ๐ฉ๐ข๐œ๐ค ๐Š:
Use the Elbow Method
โคท Plot K vs. total within-cluster variance
โคท The โ€œelbowโ€ in the curve = ideal number of clusters

๐‚๐จ๐๐ž ๐„๐ฑ๐š๐ฆ๐ฉ๐ฅ๐ž (๐’๐œ๐ข๐ค๐ข๐ญ-๐‹๐ž๐š๐ซ๐ง):

from sklearn.cluster import KMeans
X = [[1, 2], [1, 4], [1, 0], [10, 2], [10, 4], [10, 0]]
model = KMeans(n_clusters=2, random_state=0)
model.fit(X)
print(model.labels_)
print(model.cluster_centers_)


๐๐ž๐ฌ๐ญ ๐”๐ฌ๐ž ๐‚๐š๐ฌ๐ž๐ฌ:
โคท Customer segmentation
โคท Image compression
โคท Market analysis
โคท Social network analysis

๐‹๐ข๐ฆ๐ข๐ญ๐š๐ญ๐ข๐จ๐ง๐ฌ:
โ€บ Sensitive to outliers
โ€บ Requires you to predefine K
โ€บ Works best with spherical clusters

https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A ๐Ÿ“ฑ
Please open Telegram to view this post
VIEW IN TELEGRAM



tg-me.com/CodeProgrammer/3768
Create:
Last Update:

๐Š-๐Œ๐ž๐š๐ง๐ฌ ๐‚๐ฅ๐ฎ๐ฌ๐ญ๐ž๐ซ๐ข๐ง๐  ๐„๐ฑ๐ฉ๐ฅ๐š๐ข๐ง๐ž๐ - ๐Ÿ๐จ๐ซ ๐›๐ž๐ ๐ข๐ง๐ง๐ž๐ซ๐ฌ

๐–๐ก๐š๐ญ ๐ข๐ฌ ๐Š-๐Œ๐ž๐š๐ง๐ฌ?
Itโ€™s an unsupervised machine learning algorithm that automatically groups your data into K similar clusters without labels. It finds hidden patterns using distance-based similarity.

๐ˆ๐ง๐ญ๐ฎ๐ข๐ญ๐ข๐ฏ๐ž ๐ž๐ฑ๐š๐ฆ๐ฉ๐ฅ๐ž:
You run a mall. Your data has:
โ€บ Age
โ€บ Annual Income
โ€บ Spending Score

K-Means can divide customers into:
โคท Budget Shoppers
โคท Mid-Range Customers
โคท High-End Spenders

๐‡๐จ๐ฐ ๐ข๐ญ ๐ฐ๐จ๐ซ๐ค๐ฌ:
โ‘  Choose the number of clusters K
โ‘ก Randomly initialize K centroids
โ‘ข Assign each point to its nearest centroid
โ‘ฃ Move centroids to the mean of their assigned points
โ‘ค Repeat until centroids donโ€™t move (convergence)

๐Ž๐›๐ฃ๐ž๐œ๐ญ๐ข๐ฏ๐ž:
Minimize the total squared distance between data points and their cluster centroids
๐‰ = ฮฃโ€–๐ฑแตข - ฮผโฑผโ€–ยฒ
Where ๐ฑแตข = data point, ฮผโฑผ = cluster center

๐‡๐จ๐ฐ ๐ญ๐จ ๐ฉ๐ข๐œ๐ค ๐Š:
Use the Elbow Method
โคท Plot K vs. total within-cluster variance
โคท The โ€œelbowโ€ in the curve = ideal number of clusters

๐‚๐จ๐๐ž ๐„๐ฑ๐š๐ฆ๐ฉ๐ฅ๐ž (๐’๐œ๐ข๐ค๐ข๐ญ-๐‹๐ž๐š๐ซ๐ง):

from sklearn.cluster import KMeans
X = [[1, 2], [1, 4], [1, 0], [10, 2], [10, 4], [10, 0]]
model = KMeans(n_clusters=2, random_state=0)
model.fit(X)
print(model.labels_)
print(model.cluster_centers_)


๐๐ž๐ฌ๐ญ ๐”๐ฌ๐ž ๐‚๐š๐ฌ๐ž๐ฌ:
โคท Customer segmentation
โคท Image compression
โคท Market analysis
โคท Social network analysis

๐‹๐ข๐ฆ๐ข๐ญ๐š๐ญ๐ข๐จ๐ง๐ฌ:
โ€บ Sensitive to outliers
โ€บ Requires you to predefine K
โ€บ Works best with spherical clusters

https://whatsapp.com/channel/0029VaC7Weq29753hpcggW2A ๐Ÿ“ฑ

BY Python | Machine Learning | Coding | R


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/CodeProgrammer/3768

View MORE
Open in Telegram


Python | Machine Learning | Coding | R Telegram | DID YOU KNOW?

Date: |

Telegram announces Search Filters

With the help of the Search Filters option, users can now filter search results by type. They can do that by using the new tabs: Media, Links, Files and others. Searches can be done based on the particular time period like by typing in the date or even โ€œYesterdayโ€. If users type in the name of a person, group, channel or bot, an extra filter will be applied to the searches.

Chinaโ€™s stock markets are some of the largest in the world, with total market capitalization reaching RMB 79 trillion (US$12.2 trillion) in 2020. Chinaโ€™s stock markets are seen as a crucial tool for driving economic growth, in particular for financing the countryโ€™s rapidly growing high-tech sectors.Although traditionally closed off to overseas investors, Chinaโ€™s financial markets have gradually been loosening restrictions over the past couple of decades. At the same time, reforms have sought to make it easier for Chinese companies to list on onshore stock exchanges, and new programs have been launched in attempts to lure some of Chinaโ€™s most coveted overseas-listed companies back to the country.

Python | Machine Learning | Coding | R from tw


Telegram Python | Machine Learning | Coding | R
FROM USA